#ifndef MAPPLICATION_H
#define MAPPLICATION_H

#include <QApplication>
#include <QQuickItem>
#include <QQmlApplicationEngine>


class VideoManager;
class VideoSettings;

class MApplication : public QApplication
{
    Q_OBJECT
public:
    MApplication(int &argc, char* argv[]);
    ~MApplication();

    bool _initForNormalAppBoot();

    void _initCommon();

    void _shutdown();

    QQuickItem* mainRootWindow();

    VideoSettings* videoSettings();

    static MApplication* _app;

private:
    QObject* _rootQmlObject();

    QQuickItem* _mainRootWindow = nullptr;

    QQmlApplicationEngine* _qmlAppEngine = nullptr;

    VideoManager *_videoManager = nullptr;

    VideoSettings *_videoSettings = nullptr;
};

MApplication* qgcApp(void);

#endif // MAPPLICATION_H
